import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './actions'
import getters from './getters'

//使用插件vuex
Vue.use(Vuex)
//创建store对象
const state = {
  cartList : []
}
const store = new Vuex.Store({
  state,
  mutations,
  actions,
  getters
})

//挂载导出store在实例上
export default store
